<%-- 
    Document   : 500
    Created on : 21.12.2012, 12:37:53
    Author     : Lukas Marica
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>


<s:useActionBean beanclass="cz.muni.fi.pa165.portalnahoubyclient.PickerActionBean" var="actionBean"/>

<table class="listtable">
	<tr>
		<th width="24%"><f:message key="picker.name"/></th>
		<th width="24%"><f:message key="picker.surname"/></th>
		<th width="25%"><f:message key="picker.info"/></th>
		<th width="12%"><f:message key="picker.isAdmin"/></th>
		<th width="5%"></th>
		<th width="5%"></th>
	</tr>
	<c:forEach items="${actionBean.pickers}" var="picker" varStatus="status">
		<tr class="${(status.count % 2 == 0 ) ? "even" : "odd"}">
			<td><c:out value="${picker.name}"/></td>
			<td><c:out value="${picker.surname}"/></td>
			<td><c:out value="${picker.info}"/></td>
			<td><c:out value="${picker.isAdmin}"/></td>
			<td><s:link beanclass="cz.muni.fi.pa165.portalnahoubyclient.PickerActionBean" event="edit"><s:param name="picker.id" value="${picker.id}"/><f:message key="edit"/></s:link> </td>
			<td><s:link addSourcePage="true" beanclass="cz.muni.fi.pa165.portalnahoubyclient.PickerActionBean" event="delete" class="deleteentity" title="${picker.name} ${picker.surname}"><s:param name="picker.id" value="${picker.id}"/><f:message key="delete"/></s:link> </td>
		</tr>
	</c:forEach>
</table>

<s:form beanclass="cz.muni.fi.pa165.portalnahoubyclient.PickerActionBean">
	<fieldset><legend><f:message key="new"/></legend>
		<%@include file="pickerform.jsp"%>
		<s:submit name="add"><f:message key="create"/></s:submit>
		</fieldset>
</s:form>